package com.wyd.resourcetj.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;

/**
 * Read_Room
 */
@Data
@Entity
@Table
public class Read_Room {

    @Id
    @GeneratedValue
    
    private  Integer rid;
    @Column(unique = true)
    private  String name;
    private String remark;
   

    @OneToMany(mappedBy="read_Room",fetch = FetchType.LAZY,cascade = CascadeType.ALL)
	@JsonIgnore
    private List<Member> memberList = new ArrayList<Member>();
    @OneToMany(mappedBy="read_Room",fetch = FetchType.LAZY,cascade = CascadeType.ALL)
	@JsonIgnore
    private List<Consume_Log> consume_LogList = new ArrayList<Consume_Log>();
    @OneToMany(mappedBy="read_Room",fetch = FetchType.LAZY,cascade = CascadeType.ALL)
	@JsonIgnore
    private List<Statistics> statisticsList = new ArrayList<Statistics>();
    


}